<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('添加代理商费率模版')" />
    <th:block th:include="include :: datetimepicker-css" />
    </head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-agentRateInfo-add">
            <input name="agentNum" class="form-control" type="hidden">
            <input name="isdefault" readonly required class="form-control" th:value="1"  type="hidden">
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label is-required">费率模板编号：</label>
                <div class="col-sm-8">
                    <input name="arMark"  id="arMark" required class="form-control" readonly  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label  is-required">费率模版：</label>
                <div class="col-sm-8">
                    <input name="arName" required id="arName" class="form-control" onclick="selectMerchantModel()" readonly type="text">
                    <i class="fa fa-search" style="margin-top: -22px;margin-right:3px;float:right;"></i>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label is-required">附加费编号：</label>
                <div class="col-sm-8">
                    <input id="fjArMark" name="fjArMark" readonly required class="form-control" onclick="selectMerchantModelFj()"  type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">附加费(元)：</label>
                <div class="col-sm-8">
                    <input id="fjArMarkName" name="fjArMarkName"  readonly required onclick="selectMerchantModelFj()"  class="form-control" type="text">
                    <i class="fa fa-search" style="margin-top: -22px;margin-right:3px;float:right;"></i>
                </div>
            </div>
        </form>
       <!-- <div style="display: grid; place-items: center;">
            <span style="color: blue;font-size: 13px;">注:同一模版类型只可设置一个默认。</span>
        </div>-->
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "agentRateInfo"
        $("#form-agentRateInfo-add").validate({
            focusCleanup: true
        });

        /**
         * 上级费率模版
         */
        function selectMerchantModel(){
            /*$.modal.open("选择费率模版", prefix + "/selectAgentRateInfo","800","500");*/
            $.modal.open("选择费率模版", prefix + "/selectMerchantModel","800","500");
        }

        /**
         * 附加费率模版
         */
        function selectMerchantModelFj(){
            $.modal.open("选择费率模版", prefix + "/selectMerchantModelFj","800","500");
        }

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-agentRateInfo-add').serialize());
            }
        }

    </script>
</body>
</html>